package com.feng.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author ywj
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class PropertiesTest {
 
 public static void main(String[] args) {
  Properties p = new Properties();
  
  try {
   InputStream inputstream = new FileInputStream(new File("d:\\singleton.properties")); 
   p.load(inputstream);
   String s = p.getProperty("node1.item1");
   String a = p.getProperty("a");
   String b = p.getProperty("b");
   System.out.println("*******"+s+a+b);
  } catch (FileNotFoundException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
 }
}


